package com.itheima03.day13;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

/**
 * @author 刘全
 * @date 2021/8/4
 */
public class Test1 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s = "苏晋丕是傻逼";
        byte[] byte1 = s.getBytes();
        System.out.println(Arrays.toString(byte1));
        byte[] byte2 = s.getBytes("GBK");
        System.out.println(Arrays.toString(byte2));

        String s1 = new String(byte1);
        System.out.println(s1);
        String s2 = new String(byte2,"GBK");
        System.out.println(s2);
    }
}
